<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML>
<html>
  <head>
    <title>查找大夫</title>
    <%@ include file="/common/meta.jsp"%>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" href="${ctx}/css/reset.css"/>
	<link rel="stylesheet" href="${ctx}/css/seedoctors.css"/>
	<script type="text/javascript" src="${ctx}/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="http://api.go2map.com/maps/js/api_v2.5.1.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			// 地图和搜索结果框高度设置
			var mapheight = $(window).height();
			$('#mappanel').height(mapheight - 100 -32);
			$('#resultpanel').height(mapheight - 100 - 32);
			// 点击隐藏面板后地图和搜索结果框的设置
			$('#hideresult').click(function(){
				var pow = $('#map').css('marginRight');
				var parm = Math.pow(0,parseInt(pow));
				$('#map').css({marginRight : 320*parm });
				$('#results').toggle();
				$(this).css({right : 320*parm-parm });
			});
			// 改变浏览器窗口大小后对各面板大小的更改
			$(window).resize(function(){
				mapheight = $(window).height();
				$('#mappanel').height(mapheight - 100 -32);
				$('#resultpanel').height(mapheight - 100 - 32);
			});
			
			// 调用搜狗地图
			var myLatlng = new sogou.maps.LatLng(12956000,4824875);
			var myOptions = {
			  'zoom': 10,
			  'center': myLatlng
			  //'mapTypeId': sogou.maps.MapTypeId.ROADMAP
			};
			var map = new sogou.maps.Map(document.getElementById('mappanel'), myOptions);// 创建Map实例
			
			// 搜索
			$('#start').click(function startsearch() {
				var key = document.getElementById('searchkey').value;
				alert("serarch key ==" + key);
				//local.search(key);
			});
		});
	</script>
  </head>
  
  <body>
		<%@ include file="/common/userHead.jsp"%>
		<div class="wrap">
			<div class="map" id="map">
				<div class="title">
					<h2>医生搜寻</h2>
				</div>
				<div class="shadow"></div>
				<div id="mappanel"></div>
			</div>
			<div class="result" id="results">
				<div class="title">
					<h2 style="border-left:1px solid #dddddd;">结果面板</h2>
				</div>
				<div id="resultpanel" class="results"></div>
			</div>
			<a href="javascript:void(0)" id="hideresult" class="noresult"><b class="b1"></b><b class="b2"></b></a>
		</div>
	</body>
</html>
